package cj.web.activity.controllers;

import java.util.List;

import net.paoding.rose.web.annotation.Param;
import net.paoding.rose.web.annotation.Path;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.var.Model;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

import cj.web.activity.dao.GeneralizeDAO;
import cj.web.activity.domain.Generalize;

@Path("/generalize")
public class GeneralizeController{

	private static Logger logger = Logger.getLogger(GeneralizeController.class.getName());
	
	@Autowired
	private GeneralizeDAO generalizeDao;

	@Get("querymark")
	public String query(Model model,@Param("begin_date") String begin_date,@Param("end_date") String end_date)
	{
		
		List<Generalize> generalizes= generalizeDao.queryAll(begin_date,end_date);
		
//		generalizeDao.queryByMark(startTime, endTime, Constants.appkey.appmark.whcszyjsxy);
		model.add("generalizes", generalizes);
		return "/views/generalize/channel.vm";
	}
	
	
}
